# 代码结果：
    # RefinedAbstraction: Performing operation. 

from abc import ABC, abstractmethod

# 抽象类
class Abstraction(ABC):
    @abstractmethod
    def operation(self):
        pass

# 细化抽象类，提供了 operation 方法的具体实现
class RefinedAbstraction(Abstraction):
    def operation(self):
        print("RefinedAbstraction: Performing operation.")

# 实现类接口
class Implementor(ABC):
    @abstractmethod
    def operationImpl(self):
        pass

# 具体实现类 A
class ConcreteImplementorA(Implementor):
    def operationImpl(self):
        print("ConcreteImplementorA: Performing operation implementation.")

# 具体实现类 B
class ConcreteImplementorB(Implementor):
    def operationImpl(self):
        print("ConcreteImplementorB: Performing operation implementation.")

# 客户端类
class Client:
    def __init__(self, impl: Abstraction):
        self.impl = impl

    def operation(self):
        self.impl.operation()

# 客户端使用示例
if __name__ == "__main__":
    client = Client(RefinedAbstraction())
    client.operation()